Skip to content

mpgn/CVE-2018-11686

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

CVE-2018-11686

CVE-2018-11686 - FlexPaper PHP Publish Service RCE <= 2.3.6

image

found by Red Timmy Security

Technical Analysis:

Security advisory:

  • unknow

Proof Of Concept:

  1. Removing the config files

The file change_config.php of FlexPaper (PHP) doesn't check if the adminsitrator is authentication properly, allowing an attacker to delete arbitrary files on the server:

capture d'écran4

  • The yellow line shows where the check of authentication should be placed
  • The red lines show the path taken by an attacker to delete files on the server using the unlink PHP function

An attacker can craft a request like this and delete files on the folder of his choice:

POST /flexpaper/php/change_config.php HTTP/1.1
Host: 127.0.0.1:8888
[...]

SAVE_CONFIG=1&SWF_Directory=config/

With this request, an attacker deletes all files on the config directory.

  1. Setup a new config file

Since all files on the config/ folder are deleted, FlexPaper will think that the application has never been initialized:

image

Therefore an attacker is able to setup again the FlexPaper. But why ?

  1. Execute arbitrary command

Inside the setup.php there is a function called pdf2swfEnabled that uses the command exec in PHP with a parameter passed in POST by the user. Since this is the initialisation (check 2.) of FlexPaper there is no authentication.

capture d'écran3

An attacker can craft a payload like this: ?step=4&PDF2SWF_PATH=id; resulting exec(id; --version 2>&1).

  1. Getting the output

The attacker can redirect the output of the command inside the a file inside the config folder and make a GET request to read the output:

image


Fix

The check of the authentication has been added at the beginning of the change_config.php

image

About

CVE-2018-11686 - FlexPaper PHP Publish Service RCE <= 2.3.6

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages